package org.example.monitor;

/**
 * 服务监控服务接口
 * */
public interface Monitorable {
    /**
     * 输出组件统计信息
     */
    void executeMonitorCycle();

    /**
     * 获取组件名称
     */
    String getComponentName();

    /**
     * 获取组件健康状态
     */
    default HealthStatus getHealthStatus() {
        return HealthStatus.HEALTHY;
    }
}

enum HealthStatus {
    HEALTHY,
    WARNING,
    ERROR
}
